<?php

include_once "general_include.php";


$currentpage = $_SESSION['currentpage'];
$loggedUserId = $_SESSION['user_id'];
$sqlUser = "SELECT * FROM ".TABLEPREFIX."_user where user_id='".$loggedUserId."'";
$user = $UserManagerObjAjax->GetRecords("Row",$sqlUser);

$online_status = 'online_status';

$dest = $_GET['dest'];



switch ($user['online_status']) {
	case "0":
		$online_status = 'offline';	
		break;
	case "1":
		$online_status = 'online';	
		break;
	case "2":
		$online_status = 'away';	
		break;
	case "3":
		$online_status = 'busy';	
		break;
}

$ses=null;
$err=null;
if(isset($_SESSION['user_id'])){
	if($_SESSION['user_id'] != null){
		$ses=$_SESSION['user_id'];
	}
}

function freichatx_get_hash($ses){	
	require 'freichat/hardcode.php';
	$temp_id =  $ses . $uid;
	return md5($temp_id);
}


$xhash = freichatx_get_hash($ses);
$smarty->assign('xhash',$xhash);
$smarty->assign('microtime',microtime(false));
$smarty->assign('online_status',$online_status);
$smarty->assign('xhash',$xhash);
$smarty->assign('user_id',$loggedUserId);
$smarty->assign('currentpage',$currentpage);
$smarty->assign('dest',$dest);

$smarty->display("chiron.tpl");

?>